<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
  <meta charset="UTF-8">
  <title>添加学生信息</title>
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
</head>

<body style="background: #afb4db">
<div class="container">
    <h1 style="text-align: center; color: blue; font-family: Arial, sans-serif;">学生管理系统</h1>
    <hr>
    <h2>添加学生信息</h2>
    <hr>

  <form action="#" th:action="@{/saveStudent}" th:object="${student}" method="POST">

      <div class="input-group mb-3" th:width="30px">
          <span class="input-group-text" style="margin-right: 5px; border: 2px solid; border-radius: 10px;" id="basic-addon1">学生姓名：</span>
          <input type="text" th:field="*{name}" placeholder="name" width="50px" style="background-color: #f391a9; border-radius: 10px;">
      </div>

      <div class="input-group mb-3" th:width="30px">
          <span class="input-group-text" style="margin-right: 5px; border: 2px solid; border-radius: 10px;" id="basic-addon2">学生性别：</span>
          <input type="text" th:field="*{sex}" placeholder="sex" width="50px" style="background-color: #f391a9; border-radius: 10px;">
      </div>

      <div class="input-group mb-3" th:width="30px">
          <span class="input-group-text" style="margin-right: 5px; border: 2px solid; border-radius: 10px;" id="basic-addon3">学生年龄：</span>
          <input type="text" th:field="*{age}" placeholder="age" width="50px" style="background-color: #f391a9; border-radius: 10px;">
      </div>

      <div class="input-group mb-3" th:width="30px">
          <span class="input-group-text" style="margin-right: 5px; border: 2px solid; border-radius: 10px;" id="basic-addon4">学籍状态：</span>
          <input type="text" th:field="*{status}" placeholder="status" width="50px" style="background-color: #f391a9; border-radius: 10px;">
      </div>

      <div class="input-group mb-3" th:width="30px">
          <span class="input-group-text" style="margin-right: 5px; border: 2px solid; border-radius: 10px;" id="basic-addon5">学生籍贯：</span>
          <input type="text" th:field="*{ticy}" placeholder="ticy" width="50px" style="background-color: #f391a9; border-radius: 10px;">
      </div>


    <select class="form-select" aria-label="Disabled select example"   style="margin-right: 15px; border: 2px solid; border-radius: 10px;"th:field="*{className}">
      <option value="未分配"  style="margin-right: 5px; border: 2px solid; border-radius: 10px;">选择班级</option>
      <option th:each="classroom : ${listclass}" th:value="${classroom.name}" th:text="${classroom.name}"></option>
    </select>

    <button type="submit" class="btn btn-info col-2"  style="margin-right: 5px; border: 2px solid; border-radius: 10px;"> 保存 </button>
  </form>

  <hr>

  <a th:href="@{/}" th:color="red" class="btn btn-primary btn-sm mb-3"> 返回系统首页 </a>
</div>

</body>

</html>